package org.jeecg.modules.zcgl.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecg.common.system.base.entity.ApprovalBaseEntity;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Description: 应收款项信息
 * @Author: jeecg-boot
 * @Date: 2020-06-23
 * @Version: V1.0
 */
@Data
@TableName("zcgl_receivables_info")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "zcgl_receivables_info对象", description = "应收款项信息")
public class ReceivablesInfo extends ApprovalBaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 原ID
     */
    @ApiModelProperty(value = "原ID", hidden = true)
    private String oldId;

    /**
     * 合同信息
     */
    @Excel(name = "合同信息", width = 15, dictTable = "zcgl_lease_contract_info", dicText = "contract_num", dicCode = "id")
    @Dict(dictTable = "zcgl_lease_contract_info", dicText = "contract_num", dicCode = "id")
    @ApiModelProperty(value = "合同信息")
    private String leaseContractId;

    /**
     * 资产信息
     */
    @Excel(name = "资产信息", width = 15, dictTable = "zcgl_asset_info", dicText = "asset_name", dicCode = "id", pullDown = false)
    @Dict(dictTable = "zcgl_asset_info", dicText = "asset_name", dicCode = "id")
    @ApiModelProperty(value = "资产信息")
    private String assetId;

    /**
     * 资产明细
     */
    @Excel(name = "资产明细", width = 15, dictTable = "zcgl_asset_info_sub", dicText = "room_name", dicCode = "id", pullDown = false)
    @Dict(dictTable = "zcgl_asset_info_sub", dicText = "room_name", dicCode = "id")
    @ApiModelProperty(value = "资产明细")
    private String assetSubIds;

    /**
     * 客户信息
     */
    @Excel(name = "客户信息", width = 15, dictTable = "zcgl_customer_info", dicText = "CONCAT_WS( ';', `name`, phone )", dicCode = "id", pullDown = false)
    @Dict(dictTable = "zcgl_customer_info", dicText = "CONCAT_WS( ' ', `name`, phone )", dicCode = "id")
    @ApiModelProperty(value = "客户信息")
    private String customerId;

    /**
     * 入账公司
     */
    @Excel(name = "入账公司", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
    @Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
    @ApiModelProperty(value = "入账公司")
    private String rentCompanyId;

    /**
     * 款项说明
     */
    @Excel(name = "款项说明", width = 15, dicCode = "payment_instructions")
    @Dict(dicCode = "payment_instructions")
    @ApiModelProperty(value = "款项说明")
    private Integer paymentInstructions;

    /**
     * 应收总金额
     */
    @Excel(name = "应收总金额", width = 15)
    @ApiModelProperty(value = "应收总金额")
    private BigDecimal amountMoney;

    /**
     * 已收款金额
     */
    @Excel(name = "已收款金额", width = 15)
    @ApiModelProperty(value = "已收款金额")
    private BigDecimal paidAmountMoney;

    /**
     * 未收款金额
     */
    @Excel(name = "未收款金额", width = 15)
    @ApiModelProperty(value = "未收款金额")
    private BigDecimal unAmountMoney;

    /**
     * 是否计入欠费
     */
    @ApiModelProperty(value = "是否计入欠费")
//    @Excel(name = "是否计入欠费", width = 15, dicCode = "yn")
    @Dict(dicCode = "yn")
    private Integer izOwe;

    /**
     * 支付状态
     */
    @Excel(name = "支付状态", width = 15, dicCode = "pay_status")
    @Dict(dicCode = "pay_status")
    @ApiModelProperty(value = "支付状态")
    private Integer payStatus;

    /**
     * 作废状态：1
     */
    @Excel(name = "作废状态", width = 15, dicCode = "is_nullify_status")
    @Dict(dicCode = "is_nullify_status")
    @ApiModelProperty(value = "作废状态")
    private Integer isNullify;

    /**
     * 支付方式
     */
    @Excel(name = "支付方式", width = 15, dicCode = "pay_type")
    @Dict(dicCode = "pay_type")
    @ApiModelProperty(value = "支付方式")
    private Integer payType;


    /**
     * 付款开始日期
     */
    @Excel(name = "付款开始日期", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "付款开始日期")
    private Date payStartDate;

    /**
     * 开始日期
     */
    @Excel(name = "开始日期", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "开始日期")
    private Date startTime;

    /**
     * 结束日期
     */
    @Excel(name = "结束日期", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "结束日期")
    private Date endTime;

    /**
     * 收款日期
     */
    @Excel(name = "收款日期", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "收款日期")
    private Date receiptDate;

    /**
     * 收款人
     */
    @Excel(name = "收款人", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "id")
    @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "id")
    @ApiModelProperty(value = "收款人")
    private String payeeBy;

    /**
     * 收款明细
     */
    @Excel(name = "收款明细", width = 15)
    @ApiModelProperty(value = "收款明细")
    private String payeeDetails;

    /**
     * 收款说明
     */
    @Excel(name = "收款说明", width = 15)
    @ApiModelProperty(value = "收款说明")
    private String payeeRemark;
    /**
     * 付款单号
     */
    @Excel(name = "付款单号", width = 15)
    @ApiModelProperty(value = "付款单号")
    private String paymentSlipNumber;

    /**
     * 付款人
     */
    @Excel(name = "付款人", width = 15, dictTable = "zcgl_customer_info", dicText = "CONCAT_WS( ';', `name`, phone )", dicCode = "id")
    @Dict(dictTable = "zcgl_customer_info", dicText = "CONCAT_WS( ' ', `name`, phone )", dicCode = "id")
    @ApiModelProperty(value = "付款人")
    private String paymentBy;

    //    @Excel(name = "是否提醒", width = 15, dicCode = "yn")
    @Dict(dicCode = "yn")
//    @ApiModelProperty(value = "是否提醒")
    private Integer isRemind;

    //    @Excel(name = "提醒次数", width = 15)
//    @ApiModelProperty(value = "提醒次数")
    private Integer remindNum;

    @Excel(name = "金额是否确认", width = 15, dicCode = "yn")
    @Dict(dicCode = "yn")
    @ApiModelProperty(value = "金额是否确认")
    private Integer amountConfirmation;

    /**
     * 金额确认日期
     */
    @Excel(name = "金额确认日期", width = 15, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "金额确认日期")
    private Date amountConfirmationTime;

    /**
     * 附件
     */
//    @Excel(name = "附件", width = 15)
    @ApiModelProperty(value = "附件")
    private String attachment;

    @ApiModelProperty(value = "收款金额")
    @TableField(exist = false)
    private BigDecimal payeeAmount;
}
